package com.example.tetris.Tetris;


import com.example.tetris.listeners.TetrisGameoverListener;
import com.example.tetris.listeners.TetrisNextBlockListener;
import com.example.tetris.listeners.TetrisRowRemovedListener;
import ohos.agp.components.Component;
import ohos.agp.render.Canvas;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class TetrisListener implements Component.DrawTask {
    protected TetrisNextBlockListener tetrisNextBlockListener;
    protected TetrisRowRemovedListener tetrisRowRemovedListener;
    protected TetrisGameoverListener tetrisGameoverListener;

    static final HiLogLabel label = new HiLogLabel(HiLog.LOG_APP, 0x0021, "test");
    String url = "url";
    int code = 503;


    @Override
    public void onDraw(Component component, Canvas canvas) {
        //绘制

    }

    //下一块
    public void setOnTetrisNextBlock(TetrisNextBlockListener listener) {
        this.tetrisNextBlockListener = listener;

    }

    //消除行
    public void setOnTetrisRowMovedListener(TetrisRowRemovedListener listener) {
        this.tetrisRowRemovedListener = listener;
    }

    //游戏结束
    public void setOnTetrisGameOverListener(TetrisGameoverListener listener) {
        this.tetrisGameoverListener = listener;
    }
}
